define(function () {
	return {
		countDown: function (futureTime) {
			let now = Date.now();
			let future = new Date(futureTime);
			let countDownSecond = Math.floor((future - now) / 1000);
			let day = Math.floor(countDownSecond / (3600 * 24));
			let hour = Math.floor((countDownSecond % (3600 * 24)) / 3600);
			let minute = Math.floor((countDownSecond % 3600) / 60);
			let second = Math.floor(countDownSecond % 60);
			return {
				day,
				hour,
				minute,
				second,
			};
		},
	};
});
